package com.zbkj.dal.pojo.response;

import com.zbkj.dal.annotation.EnumValue;
import com.zbkj.dal.annotation.StringContains;
import com.zbkj.dal.base.enums.QualityEnum;
import com.zbkj.dal.entity.product.ProductAttr;
import com.zbkj.dal.pojo.response.ba.ProductParameterCombineResponse;
import com.zbkj.dal.pojo.vo.CouponSimpleVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.List;

/**
 * 商品详情响应对象
 * +----------------------------------------------------------------------
 * | CRMEB [ CRMEB赋能开发者，助力企业发展 ]
 * +----------------------------------------------------------------------
 * | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
 * +----------------------------------------------------------------------
 * | Licensed CRMEB并不是自由软件，未经许可不能去掉CRMEB相关版权
 * +----------------------------------------------------------------------
 * | Author: CRMEB Team <admin@crmeb.com>
 * +----------------------------------------------------------------------
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="StoreProductInfoResponse对象", description="商品详情响应对象")
public class ProductInfoResponse implements Serializable {

    private static final long serialVersionUID = 9215241889318610262L;

    @ApiModelProperty(value = "商品id")
    private Integer id;

    @ApiModelProperty(value = "商品图片")
    private String image;

    @ApiModelProperty(value = "轮播图")
    private String sliderImage;

    @ApiModelProperty(value = "商品名称")
    private String name;

    @ApiModelProperty(value = "商品简介")
    private String intro;

    @ApiModelProperty(value = "关键字")
    private String keyword;

    @ApiModelProperty(value = "商户分类id(逗号拼接)")
    private String cateId;

    @ApiModelProperty(value = "品牌id")
    private Integer brandId;

    @ApiModelProperty(value = "平台分类id")
    private Integer categoryId;

    @ApiModelProperty(value = "保障服务ids(英文逗号拼接)")
    private String guaranteeIds;

    @ApiModelProperty(value = "单位名")
    private String unitName;

    @ApiModelProperty(value = "排序")
    private Integer sort;

    @ApiModelProperty(value = "获得积分")
    private Integer giveIntegral;

    @ApiModelProperty(value = "虚拟销量")
    private Integer ficti;

    @ApiModelProperty(value = "规格 0单 1多")
    private Boolean specType;

    @ApiModelProperty(value = "商品属性")
    private List<ProductAttr> attr;

    @ApiModelProperty(value = "商品属性详情")
    private List<AttrValueResponse> attrValue;

    @ApiModelProperty(value = "商品描述")
    private String content;

    @ApiModelProperty(value = "优惠券Ids（商户端）")
    private List<Integer> couponIds;

    @ApiModelProperty(value = "优惠券列表（平台端）")
    private List<CouponSimpleVo> couponList;

    @ApiModelProperty(value = "展示图")
    private String flatPattern;

    @ApiModelProperty(value = "运费模板ID")
    private Integer tempId;

    @ApiModelProperty(value = "是否单独分佣")
    private Boolean isSub;

    @ApiModelProperty(value = "物主ID")
    private Integer ownerUid;

    @ApiModelProperty(value = "物主")
    private String ownerName;

    @ApiModelProperty(value = "参数模板")
    private Integer productTemplateId;

    @ApiModelProperty(value = "商品参数")
    private List<ProductParameterCombineResponse> productParameters;

    @ApiModelProperty(value = "商品tab")
    private List<String> tabCodes;

    /**
     * @see com.zbkj.dal.base.enums.QualityEnum
     */
    @EnumValue(value = QualityEnum.class, allowNull = false)
    @ApiModelProperty(value = "商品成色 全新、99新、95新、9新、85新、修复/残次")
    private String quality;

    // 适用人群
    @StringContains(limitValues = {"0", "1", "2"}, message = "上架类型只能是 0全 1男士 2女士")
    @ApiModelProperty(value = "适用人群 0全部 1男士 2女士")
    private String suitable;

    // 上架类型
    @StringContains(limitValues = {"0", "1", "2"}, message = "上架类型只能是 0全 1 承享 2 售卖")
    @ApiModelProperty(value = "上架类型 1 承享 2 售卖")
    private String tradeType;
}
